﻿using System;
using System.Collections.Generic;
using System.Text;


using DevComponents.DotNetBar;

namespace Shine.Framework
{
    public class CommandItemClass : ICommandItem
    {
        private BaseItem m_BaseItem;
        //private IPersistStream m_PersistStream;
        private string m_Action;
        public string Action
        {
            get
            {
                return m_Action;
            }
            set
            {
                m_Action = value;
            }
        }

        private bool m_BuiltIn;
        public bool BuiltIn
        {
            get
            {
                return m_BuiltIn;
            }
        }

        private string m_Category;
        public string Category
        {
            get
            {
                return m_Category;
            }
        }

        private string m_Caption;
        public string Caption
        {
            get
            {
                return m_Caption;
            }
            set
            {
                m_Caption = value;
            }
        }

        private ICommand m_Command;
        public ICommand Command
        {
            get
            {
                return m_Command;
            }
        }

        private object m_FaceID;
        public object FaceID
        {
            get
            {
                return m_FaceID;
            }
            set
            {
                m_FaceID = value;
            }
        }

        private bool m_Group;
        public bool Group
        {
            get
            {
                return m_Group;
            }
            set
            {
                m_Group = value;
            }
        }

        private int m_HelpContextID;
        public int HelpContextID
        {
            get
            {
                return m_HelpContextID;
            }
            set
            {
                m_HelpContextID = value;
            }
        }

        private string m_HelpFile;
        public string HelpFile
        {
            get
            {
                return m_HelpFile;
            }
            set
            {
                m_HelpFile = value;
            }
        }

        //public UID ID
        //{
        //    get
        //    {
        //        UID m_UID = new UIDClass();
        //        m_UID.Value = GetType().GUID.ToString("B");
        //        return m_UID;
        //    }
        //}

        public int Index
        {
            get
            {
                return 0;
            }
        }

        public string Message
        {
            get
            {
                return m_Command.Message;
            }
            set
            {
                // m_Command.Message = value;
            }
        }

        public string Name
        {
            get
            {
                return "";
            }
            set
            {
                ;
            }
        }
        private ICommandBar m_CommandBar;

        public ICommandBar Parent
        {
            get
            {
                return m_CommandBar;
            }
        }

        //private esriCommandStyles m_Style;
        //public esriCommandStyles Style
        //{
        //    get
        //    {
        //        return m_Style;
        //    }
        //    set
        //    {
        //        m_Style = value;
        //    }
        //}

        private string m_Tag;
        public string Tag
        {
            get
            {
                return m_Tag;
            }
            set
            {
                m_Tag = value;
            }
        }

        private string m_Tooltip;
        public string Tooltip
        {
            get
            {
                return m_Tooltip;
            }
            set
            {
                m_Tooltip = value;
            }
        }

        public esriCommandTypes Type
        {
            get
            {
                return esriCommandTypes.esriCmdTypeCommand;
            }
        }
        public CommandItemClass()
        {            
          //  m_PersistStream = ID as IPersistStream;

        }

        public void Delete()
        {

        }

        public void Execute()
        {

        }

        public void GetClassID(out Guid pClassID)
        {
            pClassID = new Guid();
        }

        //public void GetSizeMax(out _ULARGE_INTEGER pcbSize)
        //{
        //    m_PersistStream.GetSizeMax(out pcbSize);
        //}

        public void InterfaceSupportsErrorInfo(ref Guid riid)
        {
            riid = new Guid();
        }

        //public void IPersistStream_GetClassID(out Guid pClassID)
        //{
        //    m_PersistStream.GetClassID(out pClassID);
        //}

        public void IsDirty()
        {
           // m_PersistStream.IsDirty();

        }

        //public void Load(IStream pstm)
        //{
        //    m_PersistStream.Load(pstm);
        //}

        public void Refresh()
        {
            
        }

        public void Reset()
        {
           
           
        }

        //public void Save(IStream pstm, int fClearDirty)
        //{
        //    m_PersistStream.Save(pstm, fClearDirty);
        //}
    }
}
